html, body {
  padding: 0;
  margin: 0;
  height: 100%;
}

body, td {
  font-size: 14px;
}

table.layout {
  border: 0;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

table.form table.layout tr td {
  padding: 0;
}

footer .weui_btn + .weui_btn {
  margin-top: 0;
}

main {
  overflow-y: auto;
}

.weui_btn_default.g-active:not(.weui_btn_disabled) {
  color: #A1A1A1;
  background-color: #DEDEDE;
}

.weui_btn_primary.g-active:not(.weui_btn_disabled) {
  color: rgba(255, 255, 255, 0.4);
  background-color: #039702;
}

.weui_dialog_ft a.g-active {
  background-color: #EEEEEE;
}

.weui_btn_mini:after {
  display: none;
}

.action {
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/**/
body {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

header {
  flex-shrink: 0;
}

main {
  flex: 1;
}

footer {
  background-color: white;
  display: flex;
  align-content: center;
  align-items: center;
  padding: .65em .65em;
  //padding-bottom: .9em;
  overflow: hidden;
  box-sizing: border-box;
  .btn {
    flex: 1;
    margin: 0 .3em;
  }
}


//
.weui_mask {
  background-color: rgba(0, 0, 0, .5);
}

#ui_loader {
  .weui_toast {
    position: fixed;
    z-index: 50000;
    width: 7.6em;
    height: 7.6em;
    top: 50%;
    left: 50%;
    margin-left: -3.8em;
    margin-top: -3.8em;
    //background: rgba(40, 40, 40, 0.75);
    background: none;
    text-align: center;
    border-radius: 50%;
  }
}

//
.weui_navbar {
  position: relative;
}

.weui_navbar_item {
  background-color: #eaeaea;
  color: #888;
}

.weui_navbar_item.weui_bar_item_on {
  background-color: white;
  color: #444;
}

.weui_fade_toggle {
  background: rgba(0, 0, 0, 0.5);
}

#page-loading {
  position: absolute;
  z-index: 999;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;

  .spinner {
    font-size: 48px;
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
  }
  .spinner.center {
    position: absolute;
    //left: 0;
    //right: 0;
    //top: 0;
    //bottom: 0;
    //margin: auto;
    left: 50%;
    top: 44%;
    margin-left: -20px;
    margin-top: -32px;
  }
  .spinner .spinner-blade {
    position: absolute;

    left: 0.4em;
    bottom: 0;
    width: 0.044em;
    height: 0.18em;
    border-radius: 0.0555em;

    background-color: transparent;
    transform-origin: center -0.14em;
    animation: spinner-fade 1s infinite linear;
  }

  .spinner .spinner-blade:nth-child(1) {
    animation-delay: 0s;
    transform: rotate(0deg);
  }
  .spinner .spinner-blade:nth-child(2) {
    animation-delay: 0.083s;
    transform: rotate(30deg);
  }
  .spinner .spinner-blade:nth-child(3) {
    animation-delay: 0.166s;
    transform: rotate(60deg);
  }
  .spinner .spinner-blade:nth-child(4) {
    animation-delay: 0.249s;
    transform: rotate(90deg);
  }
  .spinner .spinner-blade:nth-child(5) {
    animation-delay: 0.332s;
    transform: rotate(120deg);
  }
  .spinner .spinner-blade:nth-child(6) {
    animation-delay: 0.415s;
    transform: rotate(150deg);
  }
  .spinner .spinner-blade:nth-child(7) {
    animation-delay: 0.498s;
    transform: rotate(180deg);
  }
  .spinner .spinner-blade:nth-child(8) {
    animation-delay: 0.581s;
    transform: rotate(210deg);
  }
  .spinner .spinner-blade:nth-child(9) {
    animation-delay: 0.664s;
    transform: rotate(240deg);
  }
  .spinner .spinner-blade:nth-child(10) {
    animation-delay: 0.747s;
    transform: rotate(270deg);
  }
  .spinner .spinner-blade:nth-child(11) {
    animation-delay: 0.83s;
    transform: rotate(300deg);
  }
  .spinner .spinner-blade:nth-child(12) {
    animation-delay: 0.913s;
    transform: rotate(330deg);
  }

  @-webkit-keyframes spinner-fade {
    0% {
      background-color: #69717d;
    }
    100% {
      background-color: transparent;
    }
  }

  @keyframes spinner-fade {
    0% {
      background-color: #69717d;
    }
    100% {
      background-color: transparent;
    }
  }
}

.template {
  display: none!important;
}

//

//
a.weui_actionsheet_cell {
  display: block;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  color: inherit;
  outline: none;

  &.g-active {
    background-color: #ececec;
  }
}

//
.weui_dialog_confirm.prompt {

  input {
    width: 100%;
    box-sizing: border-box;
    line-height: 26px;
    padding: 0 5px;
    margin-top: 6px;
    border: solid 1px silver;
  }

}

header {
  .btn-back {
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    bottom: 0;
    background: url('../img/ui/back1.png') no-repeat 14px center;
    //background-size: 14px 24px;
    background-size: 10px 17px;
  }
}

//
#dlgPrompt.shrink .weui_dialog {
  top: 30%;
  transition-property: top;
  transition-duration: 0.1s;
}

//
body.shrink {
  height: 50%;
}

body.shrink footer {
  margin-bottom: 4px;
}